﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<GabageFactory.Models.stack_ardealite_ditch>" %>
<%@ Import Namespace="System.Collections.Generic" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	磷石膏堆积坝（每日）
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="dolphincontainer">
	    <div id="dolphinnav">
	        <ul class="top_tab">
                <li><a href="/Record/StackWater/<%=ViewData["id"]%>?date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>水位及水质</span></a></li>
                <li><a href="/Record/BackWater/<%=ViewData["id"] %>?date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>进浆及回水</span></a></li>
                <li><a href="/Record/Settle/<%=ViewData["id"] %>?date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>沉降及位移</span></a></li>
                <li><a href="javascript:return(false);" class="current"><span>磷石膏堆积坝</span></a></li>
                <li><a href="/Record/Ditch/<%=ViewData["id"] %>?date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>截洪沟</span></a></li>
                <li><a href="/Record/PiezometerWell/<%=ViewData["id"] %>?date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>浸润线观测</span></a></li>
                <li><a href="/Record/PiezometerBase/<%=ViewData["id"] %>?date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>渗压观测</span></a></li>
                <li><a href="/Record/Drain/<%=ViewData["id"] %>?date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>导渗系统</span></a></li>
	        </ul>
	    </div>
	</div>

    <%
           bool result = (bool)ViewData["success"];
           if(result){ 
        %>
           <div class="tips_area">磷石膏堆积坝更新成功</div>
        <%
        }
        %>

    <% using (Html.BeginForm())
    {%>
        <%= Html.ValidationSummary(true) %>
        <%= Html.HiddenFor(model => model.stack_id) %>
        <%= Html.HiddenFor(model => model.date) %>
        <%= Html.Hidden("factoryId", ViewData["factoryId"]) %>
            
    
    
    <table cellpadding="4" cellspacing="0" class="com_from_table" style="width:756px;">
        <tr>
            <th colspan="2">磷石膏堆积坝（每日 - <%= Model.date.Year%>年<%=Model.date.Month%>月<%=Model.date.Day%>日）</th>
        </tr>

        <tr>
            <td class="lab" style="width:166px;">测量人员：</td>
            <td>
                <%= Html.DropDownList("tester_id", ViewData["users"] as List<SelectListItem>, "请选择", new { style = "width:150px" })%>
                <%= Html.ValidationMessageFor(model => model.tester_id)%>
            </td>
        </tr>
    </table>
    
    <fieldset class="tf_style">
        <legend>基础数据：</legend>

        <table cellpadding="4" cellspacing="0" class="com_from_table">
            <tr>
                <td class="lab" style="width:150px;">外堤最高点高程：</td>
                <td style="width:100px;">
                    <%= Html.TextBoxFor(model => model.dyke_top_El, new { style = "width:50px" })%> m
                    <%= Html.ValidationMessageFor(model => model.dyke_top_El)%>
                </td>
                <td class="lab" style="width:120px;">外堤最低点高程：</td>
                <td style="width:100px;">
                    <%= Html.TextBoxFor(model => model.dyke_bottom_El, new { style = "width:50px" })%> m
                    <%= Html.ValidationMessageFor(model => model.dyke_bottom_El)%>
                </td>
                <td class="lab" style="width:110px;">安全超高：</td>
                <td>
                    <%= Html.TextBoxFor(model => model.safe_height, new { style = "width:50px" })%> m
                    <%= Html.ValidationMessageFor(model => model.safe_height)%>
                </td>
            </tr>

            <tr>
                <td class="lab">外堤平均宽度：</td>
                <td>
                    <%= Html.TextBoxFor(model => model.dyke_avg_width, new { style = "width:50px" })%> m
                    <%= Html.ValidationMessageFor(model => model.dyke_avg_width)%>
                </td>
                <td class="lab">环形沟平均宽度：</td>
                <td>
                    <%= Html.TextBoxFor(model => model.cycle_groove_avg_width, new { style = "width:50px" })%> m
                    <%= Html.ValidationMessageFor(model => model.cycle_groove_avg_width)%>
                </td>
                <td class="lab">内堤平均宽度：</td>
                <td>
                    <%= Html.TextBoxFor(model => model.inner_dyke_avg_width, new { style = "width:50px" })%> m
                    <%= Html.ValidationMessageFor(model => model.inner_dyke_avg_width)%>
                </td>
            </tr>

            <tr>
                <td class="lab">堆积坝下游边坡坡度：</td>
                <td>
                    <%= Html.TextBoxFor(model => model.dike_downstream_slope_rate, new { style = "width:50px" })%>
                    <%= Html.ValidationMessageFor(model => model.dike_downstream_slope_rate)%>
                </td>
                <td class="lab">沉积滩最大宽度：</td>
                <td>
                    <%= Html.TextBoxFor(model => model.precipitation_beach_max_width, new { style = "width:50px" })%> m
                    <%= Html.ValidationMessageFor(model => model.precipitation_beach_max_width)%>
                </td>
                <td class="lab">沉积滩最小宽度：</td>
                <td>
                    <%= Html.TextBoxFor(model => model.precipitation_beach_min_width, new { style = "width:50px" })%> m
                    <%= Html.ValidationMessageFor(model => model.precipitation_beach_min_width)%>
                </td>
            </tr>

        </table>

    </fieldset>
    
    
    <fieldset class="tf_style">
        <p>
            <span style="display:inline-block;width:180px">是否存在集中渗流（管涌）：</span>
            <span><input type="radio" name="is_central_leaked" value="1" <%if (Model.is_central_leaked == 1){ %> checked="checked"<%} %> onclick='switchComment("is_central_leaked", "central_leaked_desc");' />有</span>
            <span><input type="radio" name="is_central_leaked" value="0" <%if (Model.is_central_leaked != 1){ %> checked="checked"<%} %> onclick='switchComment("is_central_leaked", "central_leaked_desc");' />无</span>
        </p>
        <%= Html.TextAreaFor(model => model.central_leaked_desc, new { cols="80",rows="5"})%>
        <%= Html.ValidationMessageFor(model => model.central_leaked_desc)%>
        <p></p>
        <p>
            <span style="display:inline-block;width:180px">是否存在坡面滑动：</span>
            <span><input type="radio" name="is_groove_ruined" value="1" <%if (Model.is_groove_ruined == 1){ %> checked="checked"<%} %> onclick='switchComment("is_groove_ruined", "groove_ruined_desc");' />有</span>
            <span><input type="radio" name="is_groove_ruined" value="0" <%if (Model.is_groove_ruined != 1){ %> checked="checked"<%} %> onclick='switchComment("is_groove_ruined", "groove_ruined_desc");' />无</span>
        </p>
        <%= Html.TextAreaFor(model => model.groove_ruined_desc, new { cols="80",rows="5"})%>
        <%= Html.ValidationMessageFor(model => model.groove_ruined_desc)%>
        <p></p>
        <p>
            <span style="display:inline-block;width:180px">是否存在边坡或坡脚隆起：</span>
            <span><input type="radio" name="is_slope_hunch" value="1" <%if (Model.is_slope_hunch == 1){ %> checked="checked"<%} %> onclick='switchComment("is_slope_hunch", "slope_hunch_desc");' />有</span>
            <span><input type="radio" name="is_slope_hunch" value="0" <%if (Model.is_slope_hunch != 1){ %> checked="checked"<%} %> onclick='switchComment("is_slope_hunch", "slope_hunch_desc");' />无</span>
        </p>
        <%= Html.TextAreaFor(model => model.slope_hunch_desc, new { cols="80",rows="5"})%>
        <%= Html.ValidationMessageFor(model => model.slope_hunch_desc)%>
        <p></p>
        <p>
            <span style="display:inline-block;width:180px">是否存在纵向裂缝：</span>
            <span><input type="radio" name="is_vertical_break" value="1" <%if (Model.is_vertical_break == 1){ %> checked="checked"<%} %> onclick='switchComment("is_vertical_break", "vertical_break_desc");' />有</span>
            <span><input type="radio" name="is_vertical_break" value="0" <%if (Model.is_vertical_break != 1){ %> checked="checked"<%} %> onclick='switchComment("is_vertical_break", "vertical_break_desc");' />无</span>
        </p>
        <%= Html.TextAreaFor(model => model.vertical_break_desc, new { cols="80",rows="5"})%>
        <%= Html.ValidationMessageFor(model => model.vertical_break_desc)%>
        <p></p>
        <p>
            <span style="display:inline-block;width:180px">是否存在横向裂缝：</span>
            <span><input type="radio" name="is_horizontal_break" value="1" <%if (Model.is_horizontal_break == 1){ %> checked="checked"<%} %> onclick='switchComment("is_horizontal_break", "horizontal_break_desc");' />有</span>
            <span><input type="radio" name="is_horizontal_break" value="0" <%if (Model.is_horizontal_break != 1){ %> checked="checked"<%} %> onclick='switchComment("is_horizontal_break", "horizontal_break_desc");' />无</span>
        </p>
        <%= Html.TextAreaFor(model => model.horizontal_break_desc, new { cols = "80", rows = "5" })%>
        <%= Html.ValidationMessageFor(model => model.horizontal_break_desc)%>
    </fieldset>
    
    <div class="submit_btn_area" style="margin-left:166px;">
        <input type="submit" value="提 交" />
    </div>

    <% } %>

    <script type="text/javascript">
        function switchComment(optionName, commentId) {
            var value = $("input[name=" + optionName + "]:checked").val();
            if (value == "0") {
                $("#" + commentId).css("display", "none");
            }
            else {
                $("#" + commentId).css("display", "");
            }
        }

        switchComment("is_central_leaked", "central_leaked_desc");
        switchComment("is_groove_ruined", "groove_ruined_desc");
        switchComment("is_slope_hunch", "slope_hunch_desc");
        switchComment("is_vertical_break", "vertical_break_desc");
        switchComment("is_horizontal_break", "horizontal_break_desc");
    </script>
</asp:Content>
